package com.sf.eos.cx.wxapp;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@EnableEurekaClient
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
@EnableFeignClients(basePackages = "com.sf.eos")
public class CxWxappApplication {

    public static void main(String[] args) {
        SpringApplication.run(CxWxappApplication.class, args);
    }

    /**
     * 注入RestTemplate模板注入Spring容器
     * 注解LoadBalanced实现负载均衡，可以以服务别名方式调用服务，否则只能写死服务地址方式访问
     */
  /*  @Bean
    @LoadBalanced
    RestTemplate restTemplate(){
        return new RestTemplate();
    }*/

}
